package com.schoolgard.entitybean;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * SystemClass entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "SYSTEM_CLASS")
public class SystemClass implements java.io.Serializable {

	// Fields

	private Long id;
	private String name;
	private String enable;
	private String foramt;
	private Set<SystemLog> systemLogs = new HashSet<SystemLog>(0);

	// Constructors

	/** default constructor */
	public SystemClass() {
	}

	/** minimal constructor */
	public SystemClass(Long id) {
		this.id = id;
	}

	/** full constructor */
	public SystemClass(Long id, String name, String enable, String foramt,
			Set<SystemLog> systemLogs) {
		this.id = id;
		this.name = name;
		this.enable = enable;
		this.foramt = foramt;
		this.systemLogs = systemLogs;
	}

	// Property accessors
	@Id
	@Column(name = "ID", unique = true, nullable = false, precision = 10, scale = 0)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name = "NAME", length = 64)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "ENABLE", length = 1)
	public String getEnable() {
		return this.enable;
	}

	public void setEnable(String enable) {
		this.enable = enable;
	}

	@Column(name = "FORAMT", length = 256)
	public String getForamt() {
		return this.foramt;
	}

	public void setForamt(String foramt) {
		this.foramt = foramt;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "systemClass")
	public Set<SystemLog> getSystemLogs() {
		return this.systemLogs;
	}

	public void setSystemLogs(Set<SystemLog> systemLogs) {
		this.systemLogs = systemLogs;
	}

}